package org.example.pk1;


public class SomeService {

    public boolean isEligible(Object obj){
        if(obj instanceof Person){
            return ((Person) obj).age() >= 18;
        }
        return false;
    };

    public boolean isEligible1(Object obj){
        if(obj instanceof Person p){
            return p.age() >= 18;
        }
        return false;
    };
}
